#ifndef _GLOBAL_H_
#define _GLOBAL_H_

#include <signal.h>
#include <string.h>
#include <stdio.h>
#include <stdarg.h>
#include <time.h>
#include <stdlib.h>
#include <windows.h>

#include <d3d9.h>
#include <d3dx9.h>
#include <dinput.h>
#include <dsound.h>

#include <iostream>
#include <list>
#include <dinput.h>
#include <ctime>
#include <sstream>

#include <time.h>
#include "Trace.h"


//
// Screen resolution
//
#define GL_GAME_SCREEN_RESOLUTION_640_480_24   0
#define GL_GAME_SCREEN_RESOLUTION_800_600_24   1
#define GL_GAME_SCREEN_RESOLUTION_1024_768_24  2

#define GL_GAME_SCREEN_RESOLUTION_640_480_32   10
#define GL_GAME_SCREEN_RESOLUTION_800_600_32   11
#define GL_GAME_SCREEN_RESOLUTION_1024_768_32  12

// Tham sao dung truc tiep trong game
#define MODE GL_GAME_SCREEN_RESOLUTION_800_600_24
#define FRAME_RATE 60
#define PROJECT_NAME L"MARIO"
#define IS_FULLSCREEN false

#define GL_KEYBOARD_BUFFER_SIZE	1024

extern int _screenWidth;
extern int _screenHeight;
extern float _tickperframe;

extern LPDIRECT3D9				_d3d;			// The Direct3D object
extern LPDIRECT3DDEVICE9		_d3ddv;			// The Direct3d device
extern LPDIRECT3DSURFACE9		_backBuffer;	// The buffer of direct3d
extern LPD3DXSPRITE				_spriteHandler;	// SpriteHandler to draw texture
extern LPDIRECTSOUND8			_dSound;
extern IDirectSoundBuffer*		_primaryBuffer;

extern LPDIRECTINPUT8			_di;			// The DirectInput object         
extern LPDIRECTINPUTDEVICE8		_keyboard;		// The keyboard device 

extern HINSTANCE				_hInstance;		// Handle of the game instance
extern HWND						_hWnd;			// Handle of the Game Window



#endif